package app

import (
	"context"
)

// App struct
type app struct {
	Ctx context.Context
}

var App = &app{}

// startup is called at application startup
func (a *app) Startup(ctx context.Context) {
	// Perform your setup here
	a.Ctx = ctx
}

// domReady is called after front-end resources have been loaded
func (a app) DomReady(ctx context.Context) {
	// Add your action here
}

// beforeClose is called when the application is about to quit,
// either by clicking the window close button or calling runtime.Quit.
// Returning true will cause the application to continue, false will continue shutdown as normal.
func (a *app) BeforeClose(ctx context.Context) (prevent bool) {
	return false
}

// shutdown is called at application termination
func (a *app) Shutdown(ctx context.Context) {
	// Perform your teardown here
}
